import matplotlib.pyplot as plt
import numpy as np


def toArray(data):
    list = data.split(',')
    result = []
    for i in list:
        if i == '':
            continue
        result.append(float(i))
    return np.array(result)


x = np.arange(100)

file = open('./linear.txt')
linear = toArray(file.read())
file.close()
file = open('./conv.txt')
conv = toArray(file.read())
file.close()

plt.plot(x, linear, conv, marker='o')

plt.title('MNIST Correct')
plt.xlabel('epochs')
plt.ylabel('correct')

plt.show()
